when true-or-false-instruction-list instruction-list

Starts a parallel process that repeatedly tests whether the first instruction list reports true or false. If it reports true, the second instruction list is run. To stop a when, use cancel (only on the true-or-false-instruction-list ), choose Stopall or Cancel from the Edit menu, or press - . (period).

Example:

when [ycor > 50][bk 20]
repeat 1000 [fd 1]